tensorflow.python.framework.errors_impl.OutOfRangeError: FIFOQueue

tensorflow.python.framework.errors_impl.OutOfRangeError: FIFOQueue

觉得有用的话,欢迎一起讨论相互学习~


我的微博我的github我的B站

今天遇到了这个问题

tensorflow.python.framework.errors_impl.OutOfRangeError:
FIFOQueue '_0_input_producer' is closed and has insufficient elements (requested 1, current size 0)
	 [[Node: ReaderReadV2 = ReaderReadV2[_device="/job:localhost/replica:0/task:0/cpu:0"](WholeFileReaderV2, input_producer)]]  

经过查找资料:local变量没有初始化.
初始化变量语句改成:

init_op = tf.group(tf.global_variables_initializer(), tf.local_variables_initializer())
sess.run(init_op)

posted @ 2017-09-05 15:20  WUST许志伟  阅读(7428)  评论(0编辑  收藏  举报